//190.颠倒二进制位
//https://leetcode.cn/problems/reverse-bits
class Solution {
public:
    uint32_t reverseBits(uint32_t n) {
        uint32_t ret = 0;
        for(int i = 31;i>=0;--i)
        {
            if(n&1) ret |= (1<<(i*(n&1)));
            n >>= 1;
        }
        return ret;
    }
};